import { RMIObject } from "../../Engine/RMI/RMIObject";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqFootballGameInfoHelper } from "./SeqFootballGameInfoHelper";
import { DictIntIntHelper } from "../Public/DictIntIntHelper";
import { Exception } from "../../Framework/Util/Exception";
//class AMI_IActive_footballGameInfo

export class AMI_IActive_footballGameInfo extends RMIObject {
  constructor(arg1?: Function, arg2?: Function, arg3?: any) {
    super(arg1, arg2);
    this.userObject = arg3;
    this.callFunction = "footballGameInfo";
    return;
  }

  public /* override */ __response(arg1: SerializeStream): void {
    var __is: SerializeStream;
    var infos: Array<any>;
    var hadGetRewards: Record<any, any> /* flash.utils.Dictionary */;
    var rewards: Record<any, any> /* flash.utils.Dictionary */;

    __is = arg1;
    try {
      infos = SeqFootballGameInfoHelper.read(__is);
      hadGetRewards = DictIntIntHelper.read(__is);
      rewards = DictIntIntHelper.read(__is);
    } catch (__ex) {
      this.cdeException(
        new Exception(
          "ExceptionCodeSerialize",
          Exception.ExceptionCodeSerialize
        )
      );
      return;
    }
    this.cdeResponse(infos, hadGetRewards, rewards);
    return;
  }

  public cdeResponse(
    arg1: Array<any>,
    arg2: Record<any, any> /* flash.utils.Dictionary */,
    arg3: Record<any, any> /* flash.utils.Dictionary */
  ): void {
    if (this._response) {
      this._response.call(null, this, arg1, arg2, arg3);
    }
    return;
  }
}
